package net.shao.utils;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by shao on 2016/6/29.
 */
public class ActivitiesUtils {

    public static List<Activity> activities = new ArrayList<>();

    public static void addActivity(Activity activity){
        activities.add(activity);
    }

    public static void removeActivity(Activity activity) {
        activities.remove(activity);
    }

    public static void finishAllActivity(){
        for (Activity activity : activities){
            activity.finish();
        }
    }

}
